package com.cloud.service.impl;

import com.cloud.myInterface.Factory;
import com.cloud.pojo.ReagentResult;
import com.cloud.pojo.ReagentUser;
import com.cloud.pojo.SamplingInfo;
import com.cloud.service.DataTranFeignService;
import com.cloud.tools.CommonResult;
import com.cloud.tools.CommonResultFactory;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @Author: Tangtao
 * @Date: 2022/5/5 9:26
 * @Description:  Openfeign-based service fall back
 * @ClassName: DataTranFeignServiceImpl
 */
@Component
public class DataTranFeignServiceImpl implements DataTranFeignService {

    private final Factory resultFactory = new CommonResultFactory();

    @Override
    public CommonResult saveReagentInfo(SamplingInfo samplingInfo) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult saveReagentUserInfo(List<ReagentUser> list) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult checkTestResult() {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult saveTestResultOnce(ReagentResult reagentResult) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult saveTestResultBatch(List<ReagentResult>  reagentResultList) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult resultManage(ReagentResult reagentResult) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult getRegion() {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult getResultFromUserId(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult getAllResult() {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult resultDelete(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }
}
